---
id: array
title: 数组类型
---


```ts
// 原始类型数组
let numArr:number[] = [1,3,5];
let strArr:string[] = ['1','3','5'];

// 接口数组
interface UserInfo {
    name: string
}
let arr:UserInfo[] = [{name: '张三'}]

// 泛型数组，泛型后面会讲
const strArr: Array<string> = ['张三', '李四']; 
```